home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / domacnost a kancelar / autoit / autoit-v3-setup.exe / Examples / Helpfile / _SQLite_QuerySingleRow.au3 < prev    next >
Text File  |  2007-09-08  |  713b  |  15 lines

  1. #include <SQLite.au3>
  2. #include <SQLite.dll.au3>
  3.  
  4. Local $aRow
  5. _SQLite_Startup ()
  6. _SQLite_Open () ; open :memory: Database
  7. _SQLite_Exec(-1,"CREATE TEMP TABLE settings (key,value);")
  8. _SQLite_Exec(-1,"INSERT INTO settings (key,value) VALUES ('1','setting one');")
  9. _SQLite_Exec(-1,"INSERT INTO settings (key,value) VALUES ('2','setting two');")
  10. _SQLite_Exec(-1,"INSERT INTO settings (key,value) VALUES ('3','setting Three');")
  11. _SQLite_Exec(-1,"INSERT INTO settings (key,value) VALUES ('4','setting Four');")
  12. _SQLite_QuerySingleRow(-1,"SELECT value FROM settings WHERE key = '2' LIMIT 1;",$aRow) ; Select single row and single field !
  13. MsgBox(0,"setting two:",$aRow[0])
  14. _SQLite_Close ()
  15. _SQLite_Shutdown ()